{% extends 'TopxiaAdminBundle::layout.html.twig' %}

{% set menu = 'admin_classroom_manage' %}

{% set script_controller='classroombundle/controller/classroom-admin/classroom' %}
{% block main %}

  <form id="message-search-form" class="form-inline well well-sm" action="" method="get" novalidate>
    {% include 'OrgBundle:Org:org-tree-select.html.twig' with {orgCode: app.request.get('orgCode'), modal: 'list'} %}

    <div class="form-group">
      <input class="form-control" type="text" placeholder="{{'%name%名称'|trans({'%name%':setting('classroom.name')|default('班级'|trans)})}}" name="title" value="{{ app.request.get('title') }}">
    </div>

    <button class="btn btn-primary">{{'搜索'|trans}}</button>
    {% include 'TopxiaAdminBundle:Widget:tooltip-widget.html.twig' with { icon: 'glyphicon-question-sign', content: '班级说明Tooltip'|trans|raw, placement: 'left'} %}

  </form>
  {% if classroomInfo%}
  <table class="table table-striped table-hover" id="classroom-table">
    <thead>
    <tr>
      <th>{{'%title%编号'|trans({'%title%':setting('calssroom.title')|default('班级'|trans)}) }}</th>
      <th width="25%">{{'%name%名称'|trans({'%name%':setting('classroom.name')|default('班级'|trans)})}}</th>
      {% include 'OrgBundle:Org/Parts:table-thead-tr.html.twig' %}
      <th>{{'课程数'|trans}}</th>
      <th>{{'学员数'|trans}}</th>
      <th width="15%">{{'价格'|trans}}</th>
      <th>{{'状态'|trans}}</th>
      <th>{{'操作'|trans}}</th>
    </tr>
    </thead>
    <tbody>

   {% for classroom in classroomInfo %}
      {% set category = categories[classroom.categoryId]|default(null) %}
      {% include 'ClassroomBundle:ClassroomAdmin:table-tr.html.twig' with {classroom:classroom,category:category} %}

   {% endfor %}

    </tbody>

  </table>
  {% else %}
    <div class="empty">{{'暂无%name%信息!'|trans({'%name%':setting('classroom.name')|default('班级'|trans)})}}</div>
  {% endif %}
  {% include 'OrgBundle:Org:batch-update-org-btn.html.twig' with {module:'classroom', formId:'classroom-table'} %}
  <div class="pull-right">
   {{ web_macro.paginator(paginator) }}
  </div>


{% endblock %}